module.exports = (componentName = '') => {
  return `

import {
  HIDDEN_ID,
} from '/@/components/Form/src/common/schema';
import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { CREATE_STRING } from '/@/components/Table/src/common/columns';

export const columns: BasicColumn[] = [
  {
    title: 'ID',
    dataIndex: 'id',
    width: 80,
  },
  CREATE_STRING('名称', 'name'),
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: '名称',
    component: 'Input',
  },
];

const isUpdate = ({ model }) => {
  return !!model.id;
};

export const formSchema: FormSchema[] = [
  HIDDEN_ID(),
  {
    field: 'name',
    label: '名称',
    component: 'Input',
    dynamicDisabled: isUpdate,
    required: true,
  },
];

`;
};
